package com.bdqn.t382.sz;

import java.io.IOException;
import java.io.Serializable;

public final class Animal implements Serializable {
    private String animalName;
    static final int age = 6;
    protected String animalType;
    public String address;

    public String getAnimalName() {
        return animalName;
    }

    public String getAnimalType() {
        return animalType;
    }

    public String getAddress() {
        return address;
    }

    public void setAnimalName(String animalName) {
        this.animalName = animalName;
    }

    public void setAnimalType(String animalType) {
        this.animalType = animalType;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    static final int getAge() {
        return age;
    }

    private void silentMethod() throws IOException, NullPointerException {
        System.out.println("Silent Method");
    }

    public Animal() {

    }

    private Animal(String animalName) {
        this.animalName = animalName;
    }

    protected Animal(String animalName, String animalType, String address) {
        this.animalName = animalName;
        this.animalType = animalType;
        this.address = address;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "animalName='" + animalName + '\'' +
                ", animalType='" + animalType + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
